<template>
	<view class="bg-gray">
		<view class="swipecarouselback">
			<image src="https://www.haopengsong.xyz/static/arrleft.png" class="arricon" @click="jumpback"></image>
			<carousel :res="carouselImage" class="bgshare" height='500' />
		</view>
		<view class="detail width">
			<view class="wrapper bg-white data">
				<view class="flex-row-between">
					<view class="datatime">
						<view class="datatop flex-row-start color9 font12">
							<image src="https://www.haopengsong.xyz/static/roperty/data.png" mode="widthFix" 
								class="dataicon"></image>
								入住时间
						</view>
						<view class="font16 time bold">
							10月1日
							<text class="color6 font14 day">周三</text>
						</view>
					</view>
					<view class="length">共1晚</view>
					<view class="datatime">
						<view class="datatop flex-row-start color9 font12">
							<image src="https://www.haopengsong.xyz/static/roperty/data.png" mode="widthFix" 
								class="dataicon"></image>
								入住时间
						</view>
						<view class="font16 time bold">
							10月1日
							<text class="color6 font14 day">周三</text>
						</view>
					</view>
				</view>
			</view>
			
			<view class="commonbg jieshao bg-white">
				<view class="font18 font500">岭尚小区101</view>
				<view class="color6 js">
					房间 包括食堂、棋牌室、影院、歌舞厅、书画室、温泉池、游泳池和诊所，室内均设新风系统
				</view>
			</view>
			
			<view class="bg-white xinxi commonbg">
				<view class="font15 flex-row-start font500">
					<view class="line"></view>房屋信息
				</view>
				<view class="iteminfo flex-row-between">
					<view class="info flex-row-start" v-for="(item,index) in houseType" :key='index'>
						<view class="color9 type">{{item.name}}</view>
						<view class="type">{{item.type}}</view>
					</view>
				</view>
			</view>
			
			<view class="bg-white peitao commonbg">
				<view class="font15 flex-row-start font500">
					<view class="line"></view>配套服务
				</view>
				<view class="iteminfo flex-row-between">
					<view class="info" 
						v-for="(item,index) in peitao" :key='index'>
						<image :src="item.icon" class="icon"></image>
						<view class="font13">{{item.name}}</view>
					</view>
				</view>
				<image src="https://www.haopengsong.xyz/static/roperty/showbg.png" mode="widthFix"
					class="showimg"></image>
				<image src="https://www.haopengsong.xyz/static/roperty/showbg.png" mode="widthFix"
					class="showimg"></image>
			</view>
		</view>
		
		<view class="submitbtn flex-row-between">
			<view class="price flex-row-start">
				待支付
				<view class="yellow">¥<text class="font18">0</text></view>
			</view>
			<view class="yudin" @click="jump('/pages/tabbar/roperty/houseyudin')">马上预定</view>
		</view>
	</view>
</template>

<script>
	import tpl_banner from "@/pages/tabbar/roperty/template/tpl_banner"; 
	export default {
		components: {
			carousel: tpl_banner
		},
		data(){
			return {
				carouselImage:[
					{ name:'https://www.haopengsong.xyz/static/roperty/detailbg.png'}
				],
				houseType:[
					{ name:'房型', type:'两室一厅' },
					{ name:'房屋面积', type:'35平方米' },
					{ name:'可住人数', type:'3人' },
				],
				peitao:[
					{ name:'行李托管', icon:'https://www.haopengsong.xyz/static/roperty/pt1.png' },
					{ name:'休闲娱乐', icon:'https://www.haopengsong.xyz/static/roperty/pt2.png' },
					{ name:'游泳池', icon:'https://www.haopengsong.xyz/static/roperty/pt3.png' },
					{ name:'餐饮服务', icon:'https://www.haopengsong.xyz/static/roperty/pt4.png' },
					{ name:'保险柜', icon:'https://www.haopengsong.xyz/static/roperty/pt5.png' },
					{ name:'酒店Wi-Fi', icon:'https://www.haopengsong.xyz/static/roperty/pt6.png' },
					{ name:'浴缸', icon:'https://www.haopengsong.xyz/static/roperty/pt7.png' },
					{ name:'吹风机', icon:'https://www.haopengsong.xyz/static/roperty/pt8.png' },
				]
			}
		},
		methods:{
			jump(res){
				uni.navigateTo({
					url: res
				});
			},
			jumpback(){
				// 返回上一页
				uni.navigateBack({
				    delta: 1 // 默认值是1，表示返回的页面层数
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bg-gray{
		padding-bottom: 35px;
	}
	.submitbtn{
		.yellow{
			padding: 0 5px 0 10px;
		}
		width: 100%;
		position: fixed;
		bottom: 0px;
		left:0;
		background-color: #fff;
		box-shadow: 0px -2px 0px 1px #EEEEEE;
		padding: 8px 10px;
		.yudin{
			width: 124px;
			height: 40px;
			background-color: #499C43;
			text-align: center;
			line-height: 40px;
			color:#fff;
			border-radius: 40px;
			font-size: 16px;
		}
	}
	.commonbg{
		padding: 12px 20px;
		border-radius: 12px;
		margin-top: 14px;
		.line{
			width: 4px;
			height: 16px;
			background-color: #499C43;
			margin-right: 5px;
		}
	}
	.peitao{
		.info{
			flex: 0 0 25%; 
			margin: 15px auto 10px;
			text-align: center;
			.icon{
				width: 25px;
				height: 25px;
				margin-bottom: 5px;
			}
		}
		.showimg{
			width: 100%;
			margin-top: 10px;
		}
	}
	.xinxi{
		.iteminfo{
			.info{
				flex: 0 0 50%; 
				margin-bottom: 10px;
			}
			.info:nth-child(2n){
				justify-content: flex-end;
			}
			margin-top: 15px;
			.type{
				width: 48%;
			}
		}
	}
	.jieshao{
		.js{
			line-height: 24px;
			margin-top: 10px;
		}
	}
	.data{
		padding: 12px 20px;
		border-radius: 12px;
		margin: 10px auto;
		.datatime{
			.dataicon{
				width: 13px;
				height: 13px;
				margin-right: 5px;
			}
		}
		.time{
			margin: 8px 0 0;
		}
		.day{
			font-size: 14px;
			font-weight: normal;
			padding-left: 5px;
		}
	}
	.length,.zubtn{
		background-color: #E5F6E6;
		width: 60px;
		height: 25px;
		line-height: 25px;
		text-align: center;
		color: #499C43;
		font-size: 12px;
		border-radius: 25px;
	}
	.zubtn{
		background-color: #499C43;
		color: #fff;
	}
	.detail{
		position: relative;
		top: -42px;
	}
</style>